﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Songhay.Models
{
    /// <summary>
    /// Defines a resource on a remote server.
    /// </summary>
    public class RemoteResource
    {
        /// <summary>
        /// Gets or sets the targetValues name.
        /// </summary>
        /// <value>The targetValues name.</value>
        public string DisplayName { get; set; }

        /// <summary>
        /// Gets or sets the location.
        /// </summary>
        /// <value>The location.</value>
        public Uri Location { get; set; }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return (!string.IsNullOrEmpty(this.DisplayName) && (this.Location != null))
            ? string.Format(CultureInfo.CurrentCulture, "{0}: {1}", this.DisplayName, this.Location.ToString())
            : base.ToString();
        }
    }
}
